//! Header for the ICommand interfaceclass
#ifndef CDSLOTCLOSE_H
#define CDSLOTCLOSE_H

#include "ICommand.h"
#include "Stereo.h"

//! Concrete command to close the cd drive of a stereo device
/*!
	This command closes the cd tray of its stereo device
	\class CDSlotClose
	\author Thomas Pfeiffer
	\date 21.12.2012
*/
class CDSlotClose : public ICommand {
public:

	//! CTor of the CDSlotClose
	/*!
	The CTor sets the Device the command acts on.
	\param dev The device the command acts on.
	\throws std::exception in case dev is null
	*/
	CDSlotClose(Stereo * dev);

	void Execute();
	
	void Undo();

private:
	Stereo * mDevice;
	OnOffState mLastState;
	CDState mLastCDState;
};

#endif